import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

const store = new Vuex.Store({
	state: {
		isLogin: false,
		
		subjects: [],
		isAction: false,
		isSort: false,
		isSentiment: false,
		isDel: false,
		isFilter: false,
		isSubjectWarn: false,
		isWarnlevel: false,
		
		isRefreshAllList: "",
		isRefreshImgList: "",
		isRefreshVideoList: "",
		isRefreshWarnList: "",
		isRefreshSubjectsList: "",

		listParams: {
			order_by: 3
		},

		filterParams: {},
		mediaCount: [],

		multipleMode: false,
		articleListLength: 0,
		selectedArticle: [],
		
		isInputPageInAdd: false,
		inputPageWord: [],

		noticeList: [],
		noticeJson: {},

		isEventArticle: false,
		eventArticleListLength: 0,
		isRefreshEventArticleList: "",
		
		localDateTime: null,
	},
	getters: {
		
	},
	mutations: {
		isRefreshAllListHandle(state, val) {
			state.isRefreshAllList = val;
		},
		isRefreshImgListHandle(state, val) {
			state.isRefreshImgList = val;
		},
		isRefreshVideoListHandle(state, val) {
			state.isRefreshVideoList = val;
		},
		isRefreshWarnListHandle(state, val) {
			state.isRefreshWarnList = val;
		},
		isRefreshSubjectsListHandle(state, val) {
			state.isRefreshSubjectsList = val;
		},

		isInputPageInAddHandle(state, val) {
			state.isInputPageInAdd = val;
		},
		inputPageWordHandle(state, val) {
			state.inputPageWord = val;
		},

		selectedArticleHandle(state, val) {
			state.selectedArticle = val;
		},
		updateLocalDateTime(state, val) {
			state.localDateTime = val;
		},
	}
})

export default store